﻿<ion-view view-title="我的供应商" class="myworld_mine_scqd">

	<ion-content>
		<div class="row text-center font-large-my  padding-0" id="mbrand-top1">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				我的供应商
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				授信欠款
			</div>
			<!--<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				申请代理
			</div>-->
		</div>

		<ion-slide-box delegate-handle="main-handle" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
			<ion-slide>
				<div class="list list-borderless margin-bottom-10">
							<ion-scroll  direction="y" ng-style="mbrand_myObj1" lazy-scroll>
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="margin-bottom-10" ng-repeat="data in datas.data">
						<!--循环的div-->
						<li class="item item-thumbnail-left" style="padding-bottom: 10px;">
							<img on-tap="onshow_first(data.store_id)" src="{{data.image_place1}}" style="border-radius:50% ;" />
							<p on-tap="onshow_first(data.store_id)">名称：<span class="positive">{{data.store_name}}</span></p>
							<p><span class="item-text-wrap">代理品牌：{{data.brands}}</span></p>
							<p><span class="item-text-wrap">地址：{{data.company_region}}+{{data.company_addr}}</span></p>
							<p>
								<div  class=" font-large-my">
								<span class="positive" on-tap="showPopup(data.store_id)">详情 </span>
								<span class="positive  margin-left-10-my" on-tap="showPopup_debt(data.store_id)">查看欠款</span>
								<span class="bian_red assertive border-radius-my" style="margin-left: 2rem;"  on-tap="showPopup_red(data.store_id)">&nbsp;红&nbsp;包&nbsp;</span>
							</div>
							</p>
							
						</li>
						<li class="item item-text-wrap padding-5">
							<p>{{data.company_profile}}</p>
						</li>
					</div>
					<!--循环的div-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		      </ion-scroll>
				</div>
			</ion-slide>

			<ion-slide>
				<!--还款记录-->
				<div class="list">
						<div  id="mbrand-top4" class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
								<div class="input-label">我的供应商：</div>
								<div class="input-value" ng-click="doSelectStore()">{{input.store_select.name}}</div>
							</div>
					<li class="item item-input" id="mbrand-top5">
						授信额度:<span class="assertive">{{credits.credit_line|currency:'￥'}}</span>
					</li>
					<li class="item item-input item-borderless" id="mbrand-top6">
						 当前欠款：<span class="assertive">{{credits.debt_total|currency:'￥'}}
						 	<span  ng-show="credits.t_amount">(其中待审核金额<span class="assertive font-middle-my"> {{credits.t_amount|currency:'￥'}}</span>)</span>
					</li>
					<ion-scroll  direction="y" ng-style="mbrand_myObj2" lazy-scroll>
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div style="margin-bottom: 1rem;" ng-repeat="credit in credits.credit">
						<li class="item positive-bg padding-0">
							<div class="light-bg margin-left-10-my padding-10">
								还款记录
							</div>
						</li>
						<li class="item item-input">
							旗舰店：{{credit.store_name}}
						</li>
						<li class="item padding">
							还款<span class="royal">{{credit.repayment|currency:'￥'}}</span> <span class="right-zhang font-large-my font-gray-my">{{credit.time}}</span>
						</li>
						<li class="item padding  font-large-my font-gray-my">
							还款方式：{{credit.type_name}} <span class="right-zhang">状态：{{credit.status_name}}</span>
						</li>
						<li class="col  item-image"  ng-show="credit.voucher.image!=''&&credit.voucher.image!=null">
							<img src="{{credit.voucher.image}}" />
						</li>
					</div>
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		      </ion-scroll>
					<!--循环的div-->
				</div>
			</ion-slide>
		</ion-slide-box>
	</ion-content>
</ion-view>